package models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import play.db.jpa.Model;

@Entity
@Table(name = "tradeproductlist")
public class TradeProductList extends Model {

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id")
	public Product product;
	
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "trade_id")
	public Trade trade;

	public TradeProductList() {
	}

	public TradeProductList(Product product, Trade trade) {
		this.product = product;
		this.trade = trade;
	}

}